// src/api/index.ts
import request from '@/utils/request';
import type { IBusinessData, IOverview, IOrderOverview } from '@/types/workspace';

/**
 * 查询今日运营数据
 */
export const getBusinessData = () => {
  return request<IBusinessData>({
    url: '/workspace/businessData',
    method: 'get'
  });
};

/**
 * 查询订单管理数据
 */
export const getOrderData = () => {
  return request<IOrderOverview>({
    url: '/workspace/overviewOrders',
    method: 'get'
  });
};

/**
 * 查询菜品总览
 */
export const getOverviewDishes = () => {
  return request<IOverview>({
    url: '/workspace/overviewDishes',
    method: 'get'
  });
};

/**
 * 查询套餐总览
 */
export const getSetMealStatistics = () => {
  return request<IOverview>({
    url: '/workspace/overviewSetmeals',
    method: 'get'
  });
};
